<script setup>
import {onMounted, ref} from "vue";
import Demo41 from "@/components/Demo41.vue";

const h1ref=ref(null)
const comref=ref(null)
onMounted(()=>{
  console.log(h1ref.value)
  console.log(comref.value.name)
})
</script>

<template>
  demo4 模板
<h1 ref="h1ref">我是dom 标签h1 </h1>
  <p/>
  <Demo41 ref="comref"></Demo41>
</template>

<style scoped>

</style>